<template>
  <TPagination
      v-show="listTotal > 0"
      v-model:page="queryParams.pageNo"
      v-model:limit="queryParams.pageSize"
      :total="listTotal"
      v-bind="paginationProps"
      @pagination="handlePagination"
    />
</template>
<script lang="ts" setup>
import { TPagination } from '@twa/components'
import { ref } from 'vue'
const queryParams = ref({
  pageNo: 1,
  pageSize: 10
})
const listTotal = ref(100)
// 分页配置继承至el-pagination
const paginationProps = {
  'pager-count': 3
}
const handlePagination = (obj) => {
  queryParams.value.pageNo = obj.page
  queryParams.value.pageSize = obj.limit
}
</script>
